﻿<UserControl x:Class="MoonyWeather.MoonyWeatherCtrl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:local="clr-namespace:MoonyWeather">
    <Grid>
        <Grid x:Name="mainGrid" Width="300" Background="Transparent" Panel.ZIndex="100">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto"  />
                <ColumnDefinition Width="Auto"  />
            </Grid.ColumnDefinitions>
            <StackPanel
                Grid.Column="0"
                Margin="7">
                <Image Source="{Binding Path=CurImage}" Height="80" HorizontalAlignment="Center" />
                <TextBlock 
                    Margin="0,-10,0,0"
                    Foreground="White"
                    FontSize="35"
                    FontWeight="Bold"
                    FontFamily="Trebuchet MS"
                    HorizontalAlignment="Center"
                    Text="{Binding Path=CurTemp}" />
            </StackPanel>
            <StackPanel
                Grid.Column="1"
                Margin="7"
                VerticalAlignment="Center">
                <Image
                    Source="{Binding Path=TodayImage}" 
                    Height="40"
                    HorizontalAlignment="Center"/>
                <TextBlock
                    Foreground="White"
                    FontSize="15"
                    FontWeight="Bold"
                    FontFamily="Trebuchet MS"
                    HorizontalAlignment="Center"
                    Text="{Binding Path=TodayTemp}" />
            </StackPanel>
            <StackPanel
                Grid.Column="2"
                Margin="7"
                VerticalAlignment="Center">
                <Image
                    Source="{Binding Path=TommorowImage}" 
                    Height="40"
                    HorizontalAlignment="Center" />
                <TextBlock
                    Foreground="White"
                    FontSize="15"
                    FontWeight="Bold"
                    FontFamily="Trebuchet MS"
                    HorizontalAlignment="Center"
                    Text="{Binding Path=TommorowTemp}" />
            </StackPanel>
        </Grid>
        <Border>
            <Border.Effect>
                <BlurEffect KernelType="Box" RenderingBias="Performance" />
            </Border.Effect>
            <Border>
                <Border.Effect>
                    <local:BlurInvertEffect />
                </Border.Effect>
                <Border.Background>
                    <VisualBrush AlignmentX="Center" AlignmentY="Center" Visual="{Binding ElementName=mainGrid}" />
                </Border.Background>
            </Border>
        </Border>
    </Grid>
</UserControl>
